hdc shell bytrace -b 2048 -t 10 -o /data/local/tmp/mynewtrace.ftrace graphic window

hdc file recv /data/local/tmp/mynewtrace.ftrace ./

set ymd=%date:~0,4%%date:~5,2%%date:~8,2%
for /f "tokens=* delims= " %%a in ("%ymd") do set ymd=%%a
set hms=%time:~0,2%%time:~3,2%%time:~6,2%
for /f "tokens=* delims= " %%a in ("%hms") do set hms=%%a
set dirname=traces_%ymd%
set filename=%dirname%\systrace_%ymd%_%hms%.ftrace

if not exist "%dirname" (
    mkdir "%dirname"
)

copy mynewtrace.ftrace %filename%
del mynewtrace.ftrace

pause